#pragma once
#include "PPContextImp.h"

namespace LBPROJSTREAM
{
    class IProjPlanStreamDatabase;
}

namespace LBPROJ
{
    class CPPContextReadWriteHelper
    {

    public:
        CPPContextReadWriteHelper(CPPContext* pContext);
        ~CPPContextReadWriteHelper();

        bool Open(LBPROJSTREAM::IProjPlanStreamDatabase* pDb);
        bool Write(LBPROJSTREAM::IProjPlanStreamDatabase* pDb);

    protected:
        bool ReadTask(LBPROJSTREAM::IProjPlanStreamDatabase* pDb);
        bool ReadPreTask(LBPROJSTREAM::IProjPlanStreamDatabase* pDb);
        bool WriteTaskAndPreTask(LBPROJSTREAM::IProjPlanStreamDatabase* pDb);

    protected:
        CPPContext* m_pContext;
    };

}

